home *** CD-ROM | disk | FTP | other *** search
- @ref-see-also See also in %s.
- @{{{}}}
- @{{{ sokoban-reference-file
- @if-using ( complete )
- @{{{ @sokoban-ref Description
- @if-using ( complete )
- This library defines a function for playing the well known game
- `Sokoban'. Therefor the file `~/.orisokoban' is used to store the game
- boards. The file will be generated automatically with language Inmos,
- to prevent problems with different fold marks. Each level is stored in
- a fold, using the following coding:
-
- @ref-start-item #
- wall
- @ref-end-item
- @ref-start-item .
- base
- @ref-end-item
- @ref-start-item $
- stone
- @ref-end-item
- @ref-start-item *
- stone on base
- @ref-end-item
- @ref-start-item @
- cursor
- @ref-end-item
- @ref-start-item +
- cursor on base
- @ref-end-item
-
- The library defines a own keyboard. So it can only be used for bindings
- with multiple modes. The mode is named `sokoban-kbd'. The functions
-
- @ref-start-picture
- soko-go-or-push-up, soko-run-or-push-up, soko-run-up
- soko-go-or-push-down, soko-run-or-push-down, soko-run-down
- soko-go-or-push-left, soko-run-or-push-left, soko-run-left
- soko-go-or-push-right, soko-run-or-push-right, soko-run-right
- @ref-end-picture
-
-
- are not undeclared, so they can be bound to your cursor keys. This
- library uses only the vi based bindings (hjkl).
-
- You have to define a function `SOKOBAN-RESET-KBD', which resets the
- keytables to your default table.
- @fi
- @}}}
- @fi
- @if-using ( complete sokoban-call-ref )
- @{{{ @sokoban-ref Functions and macros
- @if-using ( complete sokoban-call-ref )
- @{{{ @sokoban-ref sokoban
- You can play the well known game. You have to push the pakets to the
- bases. Bases are marked with `.'. Pakets are marked with `$', or `S'
- on bases. Running or pushing through walls (`#') is not possible.
-
- @ref-start-tbl Function 18 Key 3 Comment 36
- go-or-push-up @@ k @@
- run-or-push-up @@ K @@ repeat and stop at wall
- run-up @@ C-K @@ repeat and stop at wall or paket
- go-or-push-down @@ j @@
- run-or-push-down @@ J @@ repeat and stop at wall
- run-down @@ C-J @@ repeat and stop at wall or paket
- go-or-push-left @@ h @@
- run-or-push-left @@ H @@ repeat and stop at wall
- run-left @@ C-H @@ repeat and stop at wall or paket
- go-or-push-right @@ l @@
- run-or-push-right @@ L @@ repeat and stop at wall
- run-right @@ C-L @@ repeat and stop at wall or paket
- undo-last-move @@ u @@ if repeated, only the last one
-
- next-level @@ + @@ level has not to be solved
- previous-level @@ - @@
- save @@ s @@ not over different editing sessions
- reset @@ r @@ to last save or start, if no save
- restart-level @@ R @@ to start
-
- quit @@ q @@
- describe-bindings @@ ? @@
- @ref-end-tbl
-
- Starting a level calls save automatically!
- @}}}
- @fi
- @}}}
- @fi
- @if-using ( complete )
- @{{{ @sokoban-ref Hooks
- @if-using ( complete )
- The libary defines a macro `abort-hook-add' and a OCL tag ABORT-HOOK-ADD.
- This macro should be added to your abort-macro! If needed, an existing
- macro `abort-hook-add' will be integrated!
-
- The libary functions are marked as demand-loading.
-
- If you do not wnt to use the default file `~/.orisokoban', define the tag
- and function SOKOBAN-FILE.
- @fi
- @}}}
- @fi
- @}}}
-